﻿using IBLL;
using MD5Hash;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Model;

namespace ZY7.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class EmployeeController : ControllerBase
    {
        public EmployeeController(IEmployeeBLL bll)
        {
            Bll = bll;
        }

        public IEmployeeBLL Bll { get; }
        [HttpPost]
        public async Task<int> AddEmployee(EmployeeModel employee)
        {
            return await Bll.AddEmployee(employee);

        }
        [HttpGet]
        public EmployeeModel Login(string name, string pwd)
        {
            return Bll.Login(name, pwd);
        }
    }
}
